package com.gaofeng.day13;

public class GoodsTest {
    public static void main(String[] args) {
        Goods[] gds = new Goods[3];

        //创建三个商品
        Goods g1 = new Goods("001","华为p40",5999.00,1200);
        Goods g2= new Goods("002","保温杯",277.00,500);
        Goods g3 = new Goods("003","枸杞",12.7,60);

        gds[0] = g1;
        gds[1] = g2;
        gds[2] = g3;

        for (int i = 0; i < gds.length; i++) {
            System.out.println(gds[i].getName() + "---" + gds[i].getPrice() + "---" + gds[i].getCount());
        }


    }
}
